<html>
<head>
	<title>欣艺内容管理系统安装</title>
	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
	<link rel="stylesheet" href="./style.css" type='text/css'>
</head>	
<body>
<?php
/**
 * @authors liuqinglin 
 * @email (2961181429@qq.com) 
 * @(https://my.oschina.net/shp32131)
 * @date    2016-12-01 11:47:25
 */

//显示除e_notice之外的所有错误
error_reporting(E_ALL ^ E_NOTICE);
//判断是否已经安装
if(file_exists("./install.lock"))
{
	echo '<div class="error">你已经安装系统<br>如果需要重新安装请删除文件'.str_replace("\\", "/", dirname(__FILE__)).'/install_lock.txt</div>';
	exit;	
}
?>

<div id="main-box">

	<div class="head-dark-box">
		<strong>欣艺阳光展览公司内容管理系统安装向导</strong>
	</div>

	<?php
		$config = array(
			//框架系统配置文件
			'sysConfigFile'		=>	'../application/config/config.php',
			//框架系统数据库配置文件
			'db_config_file'	=>	'../application/config/database.php',
			//系统数据库数据表创建sql文件
			'sqlFile' 	=>	'./database.sql',
			//缓存目录
			'cacheDir' 	=>	'../application/cache',
			//上传目录
			'uploadDir' =>	'../uploads',
			//框架入口文件
			'index'		=>	'../index.php',
			//数据库配置(不用手动配置)
			'db'		=>	array(
							'hostname' => 'localhost',
							'username' => 'root',
							'password' => 'liu',
							'database' => 'xinyi',
							'dbdriver' => 'mysqli',
							'dbprefix' => 'xy_',
						)

		);
		//加载mvc类文件
		require "Model.class.php";
		require "View.class.php";
		require "Controller.class.php";
		//实例化一个控制器对象
		$install=new Controller($config);
		//从第几步开始安装
		$step = empty($_POST['step']) ? 1 : $_POST['step'];
		$install->exeStep($step);
	?>

</div>
	</body>
</html>